// Copyright 2006-2024 ClickTale Ltd., US Patent Pending window.ClickTaleGlobal = window.ClickTaleGlobal || {}; window.ClickTaleSettings = window.ClickTaleSettings || {}; ClickTaleGlobal.init = ClickTaleGlobal.init || {}; ClickTaleGlobal.scripts = ClickTaleGlobal.scripts || {}; ClickTaleGlobal.scripts.versions = {"wr": "bridge-WR110.js", "pcc": "ecfd2986-c519-41ff-a769-4fa55baf13ba.js?DeploymentConfigName=Release_20240104&Version=5"}; (function (d) { var dom="h", spe=[92,94,36,46,124,63,42,43,40,41,91,123], rep=[98,100,102,104,106,108,110,112,114,116,118,119]; for(var v,c,i=0,len=d.length;i=97&c<=122){v=c+7;v=v>122?v-26:v;v=v%2==0?v-32:v;} else if(c>=48&c<=57){v=69+(c-48)*2} else if(c==45){v=65} else if(spe.indexOf(c)>=0){v=rep[spe.indexOf(c)]} else{v=c} dom+=String.fromCharCode(v); } ClickTaleGlobal.init.isAllowed = (function() { var doms = ["GGhGOhGUhUK:WEUG","GGhGOhKKhOI:WEUG","GGhGOIhSIhGUS:GIEEI","GGhGOIhUIhIMW:GIEEI","GGhGOWhGMWhO:GIEEI","GGhGOWhGMWhQ:GIEEI","GGhGOWhGMWhS:GIEEI","GGhGOWhGQShIEO:GIEGO","HssLNPLuJLaLJohJVT","HTHgVuHDZhJVT","HVAuDiAVusPuLAkLTVhZKADLiZPaLALBADLZaAGhHTHgVuHDZhJVT","HVAVusPuLAuDiAJHykZAPuZwyPuahHwwZhkLcAwJmhsiGhyiZNywhuLa","HwwhiBZPuLZZAyLZLycLhuHaDLZahJVT","HwwsFhuHaDLZahJVT","HwwsFhyiZhJVhBR","HwwsFhBsZaLyiHuRhJVhBR","HwwsFhBsZaLyiHuRhPL","HyLaLhTHuHNLkaLZahJVT","JHVhuHaDLZahJVT","JHVhyiVZhJVhBR","JHVhyiZhJVhBR","JHVhBsZaLyiHuRhJVhBR","JHVhBsZaLyiHuRhPL","JHykZhZHVAkLTVhJVT","JHykZAJsPLuaAkLTVhLBADLZaAIhLsHZaPJiLHuZaHsRhJVT","JsVBkmyVuahuLa","kKHgBQMTFWGoLHhJsVBkmyVuahuLa","kPNPaHshBsZaLyiHuRhPL","LsHZaPJiLHuZaHsRhJVT","okkkPyLJaZVsBaPVuZhJVhBR","oVsaZTPsPaHyFiHuRhJVhBR","oVsaZTPsPaHyFiHuRPuNhJVhBR","sHZaPJiLHuZaHsRhJVT","siGhyiZNywhuLa","sVHuZhZHVAkLTVhJVT","sVHuZAJsPLuahZHVAkLTVhJVT","sVHuZAuDiAVusPuLAkLTVhLBADLZaAGhLsHZaPJiLHuZaHsRhJVT","sVTiHykhJVhBR","THuHNLkaLZahJVT","TJewsHamVyThJVThHB","TJewsHamVyThkL","TaHhZHVAkLTVhJVT","TFiHuRhTHuHNLkaLZahJVT","uHaDLZahJVT","umaLGhHyLaLhTHuHNLkaLZahJVT","VcLykyHmaZhZHVAkLTVhJVT","wLyZVuHsyiZJVBRAumaLGhHyLaLhTHuHNLkaLZahJVT","yiZhJVhBR","yiZNywhTkL","yiZAVsHmAkAGhHwwZwVahJVT","yiZAVsHmAkAIhHwwZwVahJVT","yiZAVsHmAkAKhHwwZwVahJVT","yiZAayHkLAmPuHuJLhHwwZwVahJVT","yiZAayHkLAmPuHuJLAZhHwwZwVahJVT","yLsLHZLAGEAaNAkVaAyiZAVsHmAkAIhHwwZwVahJVT","yLsLHZLAIMAJHwPaHsAyLwHFTLuaAkVaAyiZAayHkLAmPuHuJLhHwwZwVahJVT/JHwPaHsAyLwHFTLuaAoVsPkHF/uHaDLZa","yLsLHZLAIMAJHwPaHsAyLwHFTLuaAkVaAyiZAayHkLAmPuHuJLhHwwZwVahJVT/JHwPaHsAyLwHFTLuaAoVsPkHF/yiZ","yLsLHZLAWAJsPJRaHsLAkVaAyiZAVsHmAkAIhHwwZwVahJVT","yLsLHZLAWAaNAkVaAyiZAVsHmAkAIhHwwZwVahJVT","yLsLHZLANkAIOQAkHaHATHZRPuNAkVaAuDAVsHmAZsZAZhuDhyhHwwZwVahJVT","yLsLHZLANkAIOQABwkHaLAJZwAZLaaPuNZAkVaAuDAVsHmAZycAZhuDhyhHwwZwVahJVT","ZHVAkLTVhJVT","ZHVAVusPuLhuDiAkLcAGhTHuHNLkaLZahJVT","ZHVAVusPuLhuDiAumaAGhTHuHNLkaLZahJVT","ZHVAVusPuLhuDiAXHAGhTHuHNLkaLZahJVT","ZHVAVusPuLhyiZAkLcAGhTHuHNLkaLZahJVT","ZHVAVusPuLhyiZAumaAGhTHuHNLkaLZahJVT","ZHVAVusPuLhyiZAXHAGhTHuHNLkaLZahJVT","ZHVAVusPuLhBiuAkLcAGhTHuHNLkaLZahJVT","ZHVAVusPuLhBiuAumaAGhTHuHNLkaLZahJVT","ZHVAVusPuLhBiuAXHAGhTHuHNLkaLZahJVT","ZHVAVusPuLhBiyAkLcAGhTHuHNLkaLZahJVT","ZHVAVusPuLhBiyAumaAGhTHuHNLkaLZahJVT","ZHVAVusPuLhBiyAXHAGhTHuHNLkaLZahJVT","ZHVAVusPuLABiuAJHykZAPuZwyPuahHwwZhkLcAwJmhsiGhyiZNywhuLa","ZHVAVusPuLABiuAJHykZAPuZwyPuahHwwZhkLcAwJmIhsiGhyiZNywhuLa","ZHVAVusPuLABiyAJHykZAPuZwyPuahHwwZhkLcAwJmhsiGhyiZNywhuLa","ZHcPuNZhZHVAkLTVhJVT","ZLycPJLZhJo","BHaAJaiAuHaDLZahyiZAZLycPJLZhJo","BHaAJaiAyiZhyiZAZLycPJLZhJo","BsZaLyiHuRhJVhBR","BsZaLyiHuRhPL","NVVNsLhPL","BsZaLyiHuRhPL"]; if(location.protocol == "file:") return false; for(var i=0, curr; i < doms.length, curr = doms[i]; i++) { if(new RegExp("h" + curr + "$", "i").test(dom)) return true; } return false; })() })(window.location.host.toLowerCase().replace(/^((www)?\.)/i, "")); ClickTaleSettings.Proxy = { WR: "ir-ing-district.clicktale.net/ctn_v2/", ImageFlag: "ir-ing-district.clicktale.net/ctn_v2/" } ClickTaleSettings.Protocol = { Method: "ImpactRecorder" } ClickTaleGlobal.diagnostics=function(){function n(n,t,o){if(n&&t)for(var r in T){var e=T[r];e.collect(t)&&e.errors.push({message:n,url:t,lineno:o})}return!!S&&S(n,t,o)}function t(n){return"function"==typeof n}function o(){return performance?performance.now():Date.now()}function r(n){++n.sampled>n.repeats?g(n.name):e(n)}function e(n){var t=n.reporter()||{},o=n.errors.splice(0),r=n.level,e=n.url,l={loaded:n.loaded,ready:n.ready,started:n.started,level:o.length?"error":r,errors:encodeURIComponent(JSON.stringify(o))};e&&r!==k&&(n.timeToLoad>0&&(l.timeToLoad=n.timeToLoad),a(n,i(i(e+"?t=log&p="+n.pid,l),t),o))}function i(n,t){for(var o in t)n+="&"+I[o]+"="+t[o];return n}function a(n,o,r){var e=L.sendBeacon,i=function(n){n.errors=r.concat(n.errors)};if(t(e))e.call(L,o)||i(n);else{var a=new Image;a.onerror=a.ontimeout=function(){i(n)},a.timeout=3e4,a.src=o}}function l(n){T[n]&&(T[n].ready=!0)}function c(n){var t=T[n];t&&(t.loaded=!0,t.timeToLoad=t.loadStart?o()-t.loadStart:0),T[n]=t}function d(n){T[n]&&(T[n].loading=!0,T[n].loadStart=o())}function u(n){T[n]&&(T[n].started=!0)}function f(n){T[n]&&(T[n].starting=!0)}function s(n,o,r){var e=window.ClickTaleMonitor;e&&(I.monitorState=40,I.isMonitoring=42,t(e.getPid)&&v(M,e.getPid(),n||"https://conductor.clicktale.net/monitor",/\/monitor-(latest|[\d\.]+).*\.js$/i,function(){var n=t(e.getState)&&e.getState();return!this.errors.length&&n.match(/^(chunk|end)$/i)&&(this.level=k),{monitorState:n,isMonitoring:t(e.isMonitoring)&&e.isMonitoring()}},o||5e3,r||1))}function m(){g(M)}function v(t,o,r,e,i,a,l){T[t]=T[t]||new p(t,o,r,e,i,a,l),y||(S=window.onerror,window.onerror=n,y=!0)}function g(n){var t=T[n];t&&(clearInterval(t.sampler),delete T[n]);for(var o in T)return;y=!1}function p(n,t,o,e,i,a,l){var c=this;c.url=o,c.pid=t,c.errors=[],c.name=n,c.level="alert",c.repeats=l,c.loadStart=c.sampled=c.timeToLoad=0,c.loading=c.loaded=c.starting=c.started=c.ready=!1,c.reporter=function(){return i.call(c)},c.collect=function(n){return!!n.match(e)},c.sampler=setInterval(function(){r(c)},a)}function h(n,t,o){var r=n&&n.name,e=T[r];if(e){var i=e[t];"function"==typeof i&&i.apply(this,o)}}function w(n,t,o){return{on:t,off:o,onready:function(){l(n)},onloaded:function(){c(n)},onloading:function(){d(n)},onstarted:function(){u(n)},onstarting:function(){f(n)}}}var y,S,T={},L=navigator,k="info",M="monitor",I={level:0,loaded:2,ready:4,started:6,errors:8,timeToLoad:12};return{monitor:w(M,s,m),invoke:h}}(); ClickTaleGlobal.scripts.filter = ClickTaleGlobal.scripts.filter || (function () { var recordingThreshold = Math.random() * 100; return { isRecordingApproved: function(percentage) { return recordingThreshold <= percentage; } } })(); // Copyright 2006-2024 ClickTale Ltd., US Patent Pending // PID: 15 // WR destination: www36 // WR version: 17.0 // Recording ratio: 0.5 (function (){ var dependencyCallback; var scriptSyncTokens = ["wr"]; var ct2Callback, isRecorderReady; var dependencies = scriptSyncTokens.slice(0); var clickTaleOnReadyList = window.ClickTaleOnReadyList || (window.ClickTaleOnReadyList = []); var indexOf = (function(){if(Array.prototype.indexOf){return function(array,value){return array.indexOf(value)}}return function(array,value){var length=array.length;for(var i=0;i -1) { var index = indexOf(dependencies, token); if (index > -1) { dependencies.splice(index, 1); return true; } } return false; } clickTaleOnReadyList.push(function () { if (ct2Callback) { ct2Callback(); } isRecorderReady = true; }); ClickTaleGlobal.scripts.dependencies = { setDependencies: function (deps) { scriptSyncTokens = deps; }, onDependencyResolved: function (callback) { dependencyCallback = callback; }, notifyScriptLoaded: function (token) { if (isValidToken(token)) { if (dependencies.length === 0 && typeof dependencyCallback === "function") { dependencyCallback(); } } } }; ClickTaleGlobal.scripts.integration = { onReady: function (callback) { if (isRecorderReady) { callback(); } else { ct2Callback = callback; } } }; })(); ClickTaleSettings.Integration = ClickTaleSettings.Integration || {}; ClickTaleSettings.Integration.ProjectType = 3; window.ClickTaleIsXHTMLCompliant = true; if (typeof (ClickTaleCreateDOMElement) != "function") { ClickTaleCreateDOMElement = function(tagName) { if (document.createElementNS) { return document.createElementNS('http://www.w3.org/1999/xhtml', tagName); } return document.createElement(tagName); } } if (typeof (ClickTaleAppendInHead) != "function") { ClickTaleAppendInHead = function(element) { var parent = document.getElementsByTagName('head').item(0) || document.documentElement; parent.appendChild(element); } } if (typeof (ClickTaleXHTMLCompliantScriptTagCreate) != "function") { ClickTaleXHTMLCompliantScriptTagCreate = function(code) { var script = ClickTaleCreateDOMElement('script'); script.setAttribute("type", "text/javascript"); script.text = code; return script; } } // Start of user-defined pre WR code (PreLoad) //PTC Code Version 10.1 //SUP-2381 if (location.pathname.toLowerCase().indexOf("/personal/mortgages/mortgage-agreement-in-principle.html") > -1 && /MSIE|Trident/.test(window.navigator.userAgent)) { ClickTaleSettings.PTC = ClickTaleSettings.PTC || {}; ClickTaleSettings.Compression = ClickTaleSettings.Compression || {}; ClickTaleSettings.PTC.scriptsToRecreate = []; ClickTaleSettings.PTC.restoreClickTaleCreateDOMElement = function () { ClickTaleCreateDOMElement = ClickTaleSettings.PTC.oldClickTaleCreateDOMElement; ClickTaleSettings.PTC.scriptsToRecreate.forEach(function (noscript) { var wrScript = ClickTaleCreateDOMElement("script"); wrScript.crossOrigin = noscript.crossOrigin; wrScript.src = noscript.src; wrScript.type = noscript.type; wrScript.async = noscript.async; noscript.insertAdjacentElement("afterend", wrScript); }); }; (function () { ClickTaleSettings.PTC.oldClickTaleCreateDOMElement = ClickTaleCreateDOMElement; ClickTaleCreateDOMElement = function (tagName) { if (tagName.toLowerCase() === "script") { var noscript = ClickTaleSettings.PTC.oldClickTaleCreateDOMElement("noscript"); ClickTaleSettings.PTC.scriptsToRecreate.push(noscript); return noscript; } return ClickTaleSettings.PTC.oldClickTaleCreateDOMElement(tagName); }; })(); } window.ClickTaleSettings = window.ClickTaleSettings || {}; ClickTaleSettings.PTC = ClickTaleSettings.PTC || {}; ClickTaleSettings.Compression = ClickTaleSettings.Compression || {}; ClickTaleSettings.Compression.Method = function () { return "deflate"; }; ClickTaleSettings.Transport = ClickTaleSettings.Transport || {}; (function () { var Tr = ClickTaleSettings.Transport; Tr.Legacy = false; Tr.MaxConcurrentRequests = 1; Tr.BigBuffer = 120000; })(); ClickTaleSettings.Protocol = ClickTaleSettings.Protocol || {}; ClickTaleSettings.Protocol.Method = "ImpactRecorder"; if (window.Zone && typeof Zone["__symbol__"] === "function") { ClickTaleSettings.PTC.restoreZonedXHR = function (xhr) { if (xhr) { var prot = Object.getPrototypeOf(xhr); while (prot) { for (var propName in prot) { var replacement; if ((replacement = prot[Zone["__symbol__"](propName)])) { xhr[propName] = replacement; } } prot = Object.getPrototypeOf(prot); } } }; window.ClickTaleOnXHRCreated = function (xhr) { ClickTaleSettings.PTC.restoreZonedXHR(xhr); }; } if (document.readyState === "complete") { window.ClickTaleIncludedOnWindowLoad = true; } window.ClickTaleIncludedOnDOMReady = true; window.ClickTaleSettings.PTC.EnableChangeMonitor = false; window.ClickTaleSettings.PTC.UploadPageHappened = false; window.ClickTaleSettings.PTC.IsMobile = false; window.ClickTaleUIDCookieName = "WRUID14112016"; ClickTaleSettings.CheckAgentSupport = function (f, v) { if (v.t == v.IE && document.URL.indexOf("uat-ctb-natwest.rbs-services.ch") > -1) { ClickTaleSettings.PTC.okToRunPCC = false; return false; } if (v.t == v.IE && v.v <= 8) { ClickTaleSettings.PTC.okToRunPCC = false; return false; } if (v.t == v.ED) { ClickTaleSettings.Compression.Async = false; } if (v.m) { ClickTaleSettings.PTC.IsMobile = true; } if (!(v.t == v.IE && v.v == 10)) { ClickTaleSettings.PTC.EnableChangeMonitor = true; ClickTaleSettings.PTC.ConfigChangeMonitor(); } var fv = f(v); ClickTaleSettings.PTC.okToRunPCC = fv; return fv; }; ClickTaleSettings.LocRefRew = function (url) { //PRES-302 if (url) { var matches = /search-results.html\?q=([^]*)/g.exec(url); if (matches && matches.length == 2) { if (matches.length >= 2) { return url.replace(matches[1], Array(matches[1].length).join("-")); } } } return url; }; ClickTaleSettings.LocationRewriter = ClickTaleSettings.LocRefRew; ClickTaleSettings.ReferrerRewriter = ClickTaleSettings.LocRefRew; ClickTaleSettings.PTC.startsWith = function (strToTest, str) { return strToTest.lastIndexOf(str, 0) === 0; }; ClickTaleSettings.DOM = ClickTaleSettings.DOM || {}; window.ClickTaleSettings.Proxy = { WR: "ir-ing-district.clicktale.net/ctn_v2/", ImageFlag: "ir-ing-district.clicktale.net/ctn_v2/", }; (function () { var selectorForBoth = "#lpChat, #lpChat *, .ui-menu-item-wrapper,.js-time-saved,.js-money-saved,.js-new-emi,.js-current-emi,.pii-protected, .flex-container.ctHidden div, .components-input.ctHidden input, .account-details.ctHidden span,.title-wrapper h2,.components-h2,.lp_sender,.evenRoww td:nth-child(3), .oddRoww td:nth-child(3),.firstTD span"; //PII masking of Text - must provide at least one selector when uncommenting or it will brake the code var nonAttributeSelector = '.sa__financial-name,.sa__personal-name,.combo-box-suggestions-list>li>.suggestion-content>span , .form-group__controls .control-output , .cnt-bld span , form table tr td:nth-of-type(2) , label[for*="JOINT"] , div#js-postcode-result-display span.selecter-item , div#js-jointpostcode-result-display span.selecter-item , label[for*="address"] , label[for*="agreeingSwitch_CHECKBOX"] , #accountSwitching_id2 .dataTable td:nth-child(3) , #accountSwitching_id2 .dataTable td:nth-child(2), .nav-item-text,.aip-apply-pd-prepopaddress-data-joint'; nonAttributeSelector += ',.detailedResultCss .fl p,#E-MAILADDRESS,#APPLICANT_EMAIL,td.cnt-bld , [name="CAO810ActionForm"] table tr.nopad:nth-child(3) p:nth-child(1) , .activetab .MadeofMore .cnt-bld span'; nonAttributeSelector += ',.t-cnt .cnt-bg .makeSmall p:nth-of-type(5), .t-cnt tr:nth-of-type(3) td h2 , .t-cnt tr:nth-of-type(2) p:nth-of-type(1) strong , .t-cnt tr:nth-of-type(2) p:nth-of-type(4) strong , [id*="LVL_-1_QUE_0_TR"] td:first-child , label[for*="SORTACCOUNT"] , #loanAccountPayTo_ACCOUNTWITHUS option , #loanAccountPayFrom_ACCOUNTWITHUS option'; nonAttributeSelector += ',.open_a_reward_credit_card form table tbody>.nopad span , form table:nth-of-type(3) tbody tr:nth-of-type(6) td span , .bgPurple td span , form table:nth-of-type(2) tbody tr:nth-of-type(12) td , form table:nth-of-type(6) tbody tr:nth-of-type(5) td , form table:nth-of-type(6) tbody tr:nth-of-type(9) td , .pink span , .box-inner strong , .own-goal .card-content h2 , #Mobile form table:nth-of-type(2) tr:nth-of-type(4) a , form table:nth-of-type(7) tr:nth-of-type(9) td , form table:nth-of-type(7) tr:nth-of-type(11) td , form table:nth-of-type(7) tr:nth-of-type(13) td , #Mobile .pink span , #Mobile form table:nth-of-type(6) tr:nth-of-type(5) span , #Mobile form table:nth-of-type(2) tr:nth-of-type(8) span , h1[class*="PageHeading_headingText"] , h1[class*="PageHeading_headingText"] span , .customer-details-wrapper span:nth-child(2) , form p:nth-of-type(5) strong , form table:nth-of-type(6) tr:nth-of-type(13) td , #intialDepositMain_INITIALDEPOSITACCOUNTWITHUS option , #overdraftAccountSelectionPersonalDetails_SELECTACCOUNT option , #regularSavingsMain_REGULARSAVINGSACCOUNTWITHUS option , .t-cnt tr:nth-of-type(4) label , form table:nth-of-type(3) tr:nth-of-type(4) td , form table:nth-of-type(2) tr:nth-of-type(10) td , form table:nth-of-type(2) tr:nth-of-type(8) td , form table:nth-of-type(2) tr:nth-of-type(6) td'; selectorForBoth += ",.sao-client-content select"; nonAttributeSelector += ",.title-wrapper h1, .existingAddress span, .sao-field select option, form#productswitch div.user_details div, form#productswitch div.user_details span, .confirm span.body_copy_bold"; nonAttributeSelector += ',[id="productswitch:body1:head1"],#mortSpan .largeText,' + '[id="productswitch:body1:mortgage"] tbody td:nth-child(2) ' + 'span:nth-child(2),[id="productswitch:body1:mortgage"] tbody ' + 'td:nth-child(7) span:nth-child(2),[id="productswitch:body1:mortgage"]' + ' tbody td:nth-child(8) span:nth-child(2),[id="productswitch:body1:mortgage"]' + " tfoot td:nth-child(2) span, .evenRoww .firstTD span, .oddRoww .firstTD span"; nonAttributeSelector += ",.SummaryTable td,.amount-formatted, .KpiList__Item__Value__Percentage, .amount-formatted__decimals"; selectorForBoth += ',[data-field-name="whoOwns"] .btntext span, .aip-feedback-panel .aip-fbp-title, [data-field-name="retirementAge"] .form-field-label, [data-field-name="jointApplicantAgeOfRetirement"] .form-field-label, .aip-authentication .signedin-dashboard .text-only-header__heading .title-comp, #incomeDetails .aip-income-title .title-comp, #outgoingDetails .aip-outgoings-title .title-comp, #jointIncomeDetails .aip-joint-income-title .title-comp, #jointOutgoingDetails .aip-joint-outgoings-title .title-comp, #applyNowEmployeeDetails .aip-apply-empdetails-title .title-comp, #applyNowJointEmployeeDetails .aip-apply-jempdetails-title .title-comp, #applyNowPayments .aip-apply-payments-title .title-comp, #applyNowJointPayments .aip-apply-jpayments-title .title-comp, [data-field-name="accountHolderName"] .btntext span, [data-field-name="otherAccountHolder"] .btntext span, .aip-income-toggle-emp1 .ec__question__label--title, .aip-joint-income-text .text-comp, .aip-joint-income-toggle-employment1 .ec__question__label--title, .aip-joint-income-textfield-income1 .labelinfo-comp, .aip-joint-income-toggle-wrap .ec__question__label--title, #jointOutgoingDetails .aip-joint-outgoings-text, .aip-joint-outgoings-credit-cards .ec__question__label, .aip-joint-outgoings-loan-cards .ec__question__label—title, [data-field-name="whomToContact"] .btntext span, div.lp_line_state_wrapper span, span.lpc_message__text, div.lpc_message__text span, div.lpc_message__text'; // /** // * // * @param {!string} value - attribute value || textContent // * @param {!Node} node // * @param {!string} rule - css selector // * @param {!number} type - 0 - text, 1 - attribute // * @returns {!string} // */ // function transform(value, node, rule, type) { // var reg = /\w|[^\x00-\x7F]/g; // return value.replace(reg, "-"); // } ClickTaleSettings.DOM.PII = { Text: [selectorForBoth, nonAttributeSelector], Attributes: [ { rule: selectorForBoth, attr: "value", }, ], //, //Transform: transform }; if (window.location.hostname.toLowerCase().indexOf("apply") > -1) { ClickTaleSettings.DOM.PII.UseAutoMasking = true; } /** * * @param {!CSSStyleSheet} adoptedStyleSheets */ function getSerializedNode(adoptedStyleSheets) { var textArray = []; adoptedStyleSheets.forEach(function (sheet) { var rules = /** @type{!CSSRuleList} */ (sheet.cssRules); for (let i = 0; i < rules.length; i++) { var rule = rules[i]; if (rule && rule.cssText) { textArray.push(rule.cssText); } } }); if (textArray.length) { return { nodeType: 1, tagName: "style", attributes: { "data-addoptedCSS": "true", }, childNodes: [ { nodeType: 3, textContent: textArray.join("\r\n"), }, ], }; } return null; } /** * * @param {!(DocumentOrShadowRoot|Element)} root */ function addSerializedNode(root, serializeAPI) { var serializeNode, parentNode = root, adoptedStyleSheets; switch (root.nodeType) { case 11: if ((adoptedStyleSheets = /** @type{!CSSStyleSheet} */ (root.adoptedStyleSheets)) && adoptedStyleSheets.length) { serializeNode = getSerializedNode(adoptedStyleSheets); } break; case 1: if (typeof root.getRootNode === "function") { root = root.getRootNode(); addSerializedNode(root, serializeAPI); } break; case 9: if ((adoptedStyleSheets = /** @type{!CSSStyleSheet} */ (root.adoptedStyleSheets)) && adoptedStyleSheets.length) { serializeNode = getSerializedNode(adoptedStyleSheets); parentNode = document.head || document.documentElement; } break; } if (serializeNode && parentNode) { serializeAPI.addChild(parentNode, null, serializeNode); } } ClickTaleSettings.DOM.Serializer = ClickTaleSettings.DOM.Serializer || {}; ClickTaleSettings.DOM.Serializer.OnAfterSerialize = function (serializeAPI) { var allObservableRoots; if ("adoptedStyleSheets" in Document.prototype && window.ClickTaleGlobal && ClickTaleGlobal.symbols && ClickTaleGlobal.symbols.rootsManager && typeof ClickTaleGlobal.symbols.rootsManager.getAllObservableRoots === "function" && Array.isArray((allObservableRoots = /** @type{!Array.} */ (ClickTaleGlobal.symbols.rootsManager.getAllObservableRoots())))) { allObservableRoots.forEach(function (root) { addSerializedNode(root, serializeAPI); }); } }; var locationRules = [ { selector: ".sao-client-content .title-wrapper h1", Attributes: false, Text: true, location: { prop: "href", search: /^.*\b(#\/next-steps)\b.*$/i, }, }, { //RBSFULL-1216 selector: "#form_values *", Attributes: false, Text: true, location: { prop: "href", search: /(?:complaint-form)/i, }, }, ]; locationRules.forEach(function (rule) { if (rule.location) { var prop = rule.location.prop; var search = rule.location.search; if (search.test(location[prop])) { var Attributes = rule.Attributes; var selector = rule.selector; var Text = rule.Text; var PII = ClickTaleSettings.DOM.PII; if (Text) { PII.Text.push(selector); } if (Array.isArray(Attributes)) { Attributes.forEach(function (attr) { PII.Attributes.push({ rule: selector, attr: attr, }); }); } } } }); })(); (function () { if (typeof window.ClickTalePIISelector === "string" && ClickTalePIISelector != "") { try { var domNodes = document.querySelector(ClickTalePIISelector); var PII = ClickTaleSettings.DOM.PII; PII.Text.push(ClickTalePIISelector); PII.Attributes.push({ rule: ClickTalePIISelector, attr: "value", }); } catch (err) { if (typeof ClickTaleNote === "function") { ClickTaleNote("Bad PII selector: " + encodeURIComponent(ClickTalePIISelector)); } } } })(); ClickTaleSettings.PTC.AssetManager = { isActive: true, isNeedForImg: false, subscriberId: "233219", pid: "15", storageUrl: "https://s3.amazonaws.com/nv-p1-s3-assets-01/", prefixSpecialCharacters: false, getPrefixUrl: function () { return this.storageUrl + this.subscriberId + "/" + this.pid; }, getFullURL: function (type, url) { var AMUrl = ""; if (url) { switch (type) { case "css": AMUrl = this.getPrefixUrl() + "/CSS/" + url.replace(/:\/\//g, "/").replace(/%20/g, " "); if (this.prefixSpecialCharacters && this.prefixSpecialCharacters.test(AMUrl)) { AMUrl = AMUrl.replace(/\?/g, "%253F").replace(/\&/g, "%26").replace(/\=/g, "%3D"); } else { AMUrl = AMUrl.replace(/\?.*/g, ""); } break; case "image": AMUrl = this.getPrefixUrl() + "/IMAGE/" + url.replace(/:\/\//g, "/").replace(/%20/g, " "); break; } } return !!AMUrl ? AMUrl : false; }, init: function () { if (this.isActive && this.pid && this.subscriberId) { var transform = (ClickTaleSettings.DOM.Transform = ClickTaleSettings.DOM.Transform || []); transform.push({ rule: 'link[href][rel*="stylesheet"]', attr: "href", transform: function (value, node) { if (value.indexOf("fonts.googleapis.com") == -1) { return ClickTaleSettings.PTC.AssetManager.getFullURL("css", node.href); } return value; }, }); transform.push({ //SUP-1747 rule: "*", attr: "data-identifier", transform: function (value, node) { if (node.hasAttribute('someone@example.com""')) { node.removeAttribute('someone@example.com""'); } if (node.hasAttribute('yyyy""')) { node.removeAttribute('yyyy""'); } if (node.hasAttribute("}")) { node.removeAttribute("}"); } return ""; }, }); if (this.isNeedForImg) { transform.push({ rule: "img[src]", attr: "src", transform: function (value, node) { return ClickTaleSettings.PTC.AssetManager.getFullURL("img", node.src); }, }); } } }, }; ClickTaleSettings.PTC.AssetManager.init(); ClickTaleSettings.PTC.ConfigChangeMonitor = function () { var excludeBothArray = []; ClickTaleSettings.ChangeMonitor = { Enable: ClickTaleSettings.PTC.EnableChangeMonitor, // Roots: [document.body], Exclude: { ChildNodes: [], Attributes: [], }, }; var exclude = ClickTaleSettings.ChangeMonitor.Exclude; if (excludeBothArray.length > 0) { Array.prototype.push.apply(exclude.ChildNodes, excludeBothArray); Array.prototype.push.apply(exclude.Attributes, excludeBothArray); } function insertIntoBoth(selector) { exclude.ChildNodes.push(selector); exclude.Attributes.push(selector); } // if (document.location.pathname === '/') { // insertIntoBoth("selector"); // } if (typeof window.ClickTaleCMSelector === "string" && window.ClickTaleCMSelector != "") { try { var domNodes = document.querySelector(ClickTaleCMSelector); insertIntoBoth(ClickTaleCMSelector); } catch (err) { if (typeof ClickTaleNote === "function") { ClickTaleNote("Bad CM selector: " + encodeURIComponent(ClickTalePIISelector)); } } } }; ClickTaleSettings.PTC.doOnlyWhen = function (toDoHandler, toCheckHandler, interval, times, failHandler) { if (!toDoHandler || !toCheckHandler) return; if (typeof interval == "undefined") interval = 100; if (typeof times == "undefined") times = 10; if (--times < 0) { if (typeof failHandler === "function") { failHandler(); } return; } if (toCheckHandler()) { toDoHandler(); return; } setTimeout(function () { ClickTaleSettings.PTC.doOnlyWhen(toDoHandler, toCheckHandler, interval, times, failHandler); }, interval); }; function ClickTaleOnRecording() {} // End of user-defined pre WR code var isHttps = document.location.protocol == 'https:', scriptSource = window.ClickTaleScriptSource, pccSource = scriptSource; if (!scriptSource) { window.ClickTaleScriptSource = isHttps ? 'https://cdnssl.clicktale.net/www/' : 'http://cdn.clicktale.net/www/'; } if(!ClickTaleGlobal.init.pccRequested) { var pccSrc = pccSource ? pccSource : (isHttps ? 'https://cdnssl.clicktale.net/pcc/' : 'http://cdn.clicktale.net/pcc/'); pccSrc += 'ecfd2986-c519-41ff-a769-4fa55baf13ba.js?DeploymentConfigName=Release_20240104&Version=5'; var pccScriptElement = ClickTaleCreateDOMElement('script'); pccScriptElement.type = "text/javascript"; pccScriptElement.crossOrigin = "anonymous"; pccScriptElement.async = true; if(ClickTaleGlobal.scripts.sri && ClickTaleGlobal.scripts.sri.hashes){ pccScriptElement.integrity = ClickTaleGlobal.scripts.sri.hashes.pcc; pccScriptElement.src = ClickTaleGlobal.scripts.sri.path + "pcc.js"; }else { pccScriptElement.src = pccSrc; } ClickTaleGlobal.init.isAllowed && document.body.appendChild(pccScriptElement); ClickTaleGlobal.init.pccRequested = true; } window.ClickTalePrevOnReady = typeof window.ClickTaleOnReady == 'function' ? window.ClickTaleOnReady : void 0; window.ClickTaleOnReady = function() { var PID=15, Ratio=0.5, PartitionPrefix="www36", SubsId=233219; if (window.navigator && window.navigator.loadPurpose === "preview") { return; }; // Start of user-defined header code (PreInitialize) if (location.pathname.toLowerCase().indexOf('/personal/mortgages/mortgage-agreement-in-principle.html') > -1 && /MSIE|Trident/.test(window.navigator.userAgent)) { return; } window._uxa = window._uxa || []; window.ClickTaleSettings.PTC = window.ClickTaleSettings.PTC || {}; window.ClickTaleSettings.PTC.CustomVariables = window.ClickTaleSettings.PTC.CustomVariables || []; window.ClickTaleSettings.PTC.CustomVariables = [ { displayName: 'Page Name', key: 'page.name', slot: 1 }, { displayName: 'Page Type', key: 'page.type', slot: 2 }, { displayName: 'Site Brand', key: 'site.brand', slot: 3 }, { displayName: 'Busniess Area', key: 'site.businessArea', key2: 'site.business.area', slot: 4 }, { displayName: 'Site Section', key: 'site.section', slot: 5 }, { displayName: 'Logged In', key: 'user.loggedIn', key2: 'user.authenticated', slot: 6 }, { displayName: 'Step', selector: '#stepProgress', slot: 7 } ]; function isObjEmpty(obj) { for (var key in obj) { if (obj.hasOwnProperty(key)) { return false; } } return true; } function getCvarValue(key) { var keys = key.split('.'); var data = window["digitalData"]; for (var j = 0; j < keys.length; j++) { if (!!data[keys[j]]) { data = data[keys[j]]; } } if (!!data && typeof data === 'string') { return data; } } function sendDataLayerVar() { var data = window["digitalData"]; var cv = window.ClickTaleSettings.PTC.CustomVariables; if (!!data && !isObjEmpty(data)) { for (var i = 0; i < cv.length; i++) { if (!!cv[i].selector) { if (cv[i].displayName == 'Step' && document.location.href.toLowerCase().indexOf('/eligibility-tool.html') > -1 && !!document.querySelector(cv[i].selector)) { var step = document.querySelector(cv[i].selector).getAttribute('data-currentstep'); !!step && window._uxa.push(['setCustomVariable', cv[i].slot, cv[i].displayName, step]); } } else { var value = getCvarValue(cv[i].key); if (!value && !!cv[i].key2) { value = getCvarValue(cv[i].key2); } !!value && window._uxa.push(['setCustomVariable', cv[i].slot, cv[i].displayName, value]); } } } } window.ClickTaleOnStop = window.ClickTaleOnStop || []; ClickTaleOnStop.push(sendDataLayerVar); sendDataLayerVar(); if (location.href.indexOf('borrowing-needs/borrowing-needs-tool.html') > -1) { const elm = document.querySelector('.form-display h2.title-comp'); const step = !!elm && elm.textContent.trim().toLowerCase().replace(/ /g, ''); if (!!step) { window._uxa.push(['setQuery', document.location.search + '?__' + step]); } } if (document.location.href.toLowerCase().indexOf("#/switcher-old-account") > -1) { return; } if (document.location.href.toLowerCase().indexOf("cc/content/#/confirm-details") > -1) { return; } if (document.location.href.toLowerCase().indexOf("loans/content/#/confirm-details") > -1) { return; } if (document.location.href.toLowerCase().indexOf("ca/content/#/confirm-details") > -1) { return; } if (document.location.href.toLowerCase().indexOf("savings/content/#/confirm-details") > -1) { return; } // SUP-1075 if (document.location.href.indexOf('personal.natwest.com/personal/support-centre/how-to-complain') > -1) { return; } if (typeof ClickTaleSetAllSensitive === "function") { ClickTaleSetAllSensitive(); }; //MaritzCX Integration Start if (ClickTaleSettings.PTC.RecordSurvey === false) { return; } //MaritzCX Integration End var ctPathName = location.pathname.toLowerCase(); var ctHash = location.hash.toLocaleLowerCase(); var unChangedUrl = location.href; var mainSectionVisibility; var overdraftCalculatorPage = false; var logoutPage = false; if (ctPathName.indexOf('/logout') > -1) { logoutPage = true; } window.ClickTaleSettings.PTC.InitFuncs = window.ClickTaleSettings.PTC.InitFuncs || []; window.ClickTaleSettings.PTC.InitFuncs.push(function () { var pcc = document.querySelector('script[src*="clicktale"][src*="pcc"]'); if (pcc) { var versionmatch = pcc.src.match(/DeploymentConfigName=(.+)/i); if (versionmatch && typeof ClickTaleExec === 'function') { ClickTaleExec("console.info('" + versionmatch[0] + "');"); ClickTaleEvent("Config: " + versionmatch[1].replace(/\&.+/, '')); } } }); function isVisible(element) { if (element && typeof element == 'string') { element = document.querySelectorAll(element); } if (element instanceof NodeList) { element = element[0]; } if (element instanceof Element) { return ((element.offsetWidth > 0 && element.offsetHeight > 0) || element['getClientRects']().length > 0); } return false; } function TestSA() { if (typeof ClickTaleEvent === "function") { ClickTaleEvent("page uploaded"); } if (document.location.href.indexOf("/personal/mortgages/mortgage-agreement-in-principle") > -1) { setTimeout(function () { ClickTaleUploadPageNow(); }, 3000); } else { ClickTaleUploadPageNow(); } } function doUpload() { if (typeof ClickTaleUploadPageNow === 'function' && ClickTaleIsRecording()) { if (logoutPage) { ClickTaleUploadPageNow(); } else { window.ClickTaleSettings.PTC.doOnlyWhen(TestSA, function () { if (overdraftCalculatorPage) { if (mainSectionVisibility) { setTimeout(function () { return true; }, 50); } else { return false; } } else { return isVisible('body'); } }, 100, 15, TestSA); } }; }; function isReadyToRecord() { if (typeof ClickTaleUploadPageNow === 'function' && ClickTaleIsRecording()) { if (logoutPage) { doUpload(); } else { //RBSFULL-1011 if (ctPathName.indexOf('/personal.html') > -1) { return (document.querySelectorAll('#main-content-wrapper img').length > 0); } // else if(unChangedUrl.indexOf('apply.natwest.com/loans/content') > -1){ // return !document.querySelector("#loader"); // } else if (ctPathName.indexOf('/personal/current-accounts/overdrafts/overdraft-calculator.html') > -1) { overdraftCalculatorPage = true; mainSectionVisibility = document.querySelector('#mainSection').style.visibility == 'visible'; if (mainSectionVisibility) { return true; } else { return false; } } else if (/interactive|loaded|complete/.test(document.readyState)) { if (ctPathName.indexOf('/content/index.html') > -1 && ctHash.indexOf('personal-details') > -1) { // RBSFULL-865 return !!(document.querySelectorAll('article#mainCard').length > 0); } } else if (ctPathName.indexOf("/index.html#/personal-details") > -1) { return !(document.querySelectorAll(".wrapperLoader").length > 0); } return true; } } return false; }; if (typeof ClickTaleDelayUploadPage === 'function') { ClickTaleDelayUploadPage(); //AB Test Integration Timeout setTimeout(function () { window.ClickTaleSettings.PTC.doOnlyWhen(doUpload, isReadyToRecord, 200, 50, function () { if (typeof ClickTaleEvent === "function") { ClickTaleEvent("delay upload page Time Passed"); } doUpload(); }); }, 500); var initFuncs = window.ClickTaleSettings.PTC.InitFuncs; for (var i = 0, initLen = initFuncs.length; i < initLen; i++) { if (typeof initFuncs[i] === 'function') { initFuncs[i](); } } } // End of user-defined header code (PreInitialize) window.ClickTaleIncludedOnDOMReady=true; ClickTaleGlobal.init.isAllowed && ClickTale(PID, Ratio, PartitionPrefix, SubsId); if((typeof ClickTalePrevOnReady == 'function') && (ClickTaleOnReady.toString() != ClickTalePrevOnReady.toString())) { ClickTalePrevOnReady(); } // Start of user-defined footer code // End of user-defined footer code }; (function() { var div = ClickTaleCreateDOMElement("div"); div.id = "ClickTaleDiv"; div.style.display = "none"; document.body.appendChild(div); var wrScript = ClickTaleCreateDOMElement("script"); wrScript.crossOrigin = "anonymous"; wrScript.type = 'text/javascript'; wrScript.async = true; if(ClickTaleGlobal.scripts.sri && ClickTaleGlobal.scripts.sri.hashes){ wrScript.integrity = ClickTaleGlobal.scripts.sri.hashes.wr; wrScript.src = ClickTaleGlobal.scripts.sri.path + "wr.js"; }else { wrScript.src = window.ClickTaleScriptSource + 'bridge-WR110.js'; } ClickTaleGlobal.init.isAllowed && document.body.appendChild(wrScript); })(); //Signature:NVtjMlw01kvD8+Wt6bRjOWbzDmf7DUdM0n+m9pxkmEZZWpINDFQhX+cjTEZFhNbtEDVqKvSn3bWiO+5tBw+xzlgR/bTqm6tWbeW5UEuu52fdG3dtXsoYAFRZcFyOOZIOtepAieBvJxI69RFw3UK5kWFuosybLgDYQfpXsCXiooE=